package cn.aws360.boot.data.starter.config;

import cn.aws360.boot.data.api.pojo.properties.DruidProperties;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author junnan
 */
@Configuration
@AutoConfigureBefore(DataSourceAutoConfiguration.class)
public class DataAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(DruidProperties.class)
    public DruidProperties druidProperties() {
        return new DruidProperties();
    }

}
